<div class="text-left sub_titulo"><h3>{$Tr->_('event_list')}</h1></h3></div>
<div class="text-right buscador ">
{include file = 'backend/layout/search.tpl'}
</div>
<!--Agrego link a crear categoria-->
{if $user_data->role eq "ADM"}
    <div class="nuevo text-right"><a href="/evento/crear/" title="{$Tr->_('add')}" class="glyphicon glyphicon-plus-sign"></a></div>
{/if}
<table width="612" border="0" class="table table-hover">
  <tr>
      {if $rows==null}<th style="background-color: #000870; text-align: center;">No hay resultados para su búsqueda</th>
        {else}
            <th style="background-color: #000870;" width="170">Id</th>
            <th style="background-color: #000870;" width="180"></th>
            <th style="background-color: #000870;" width="180">{$Tr->_('name')}</th>
            <th style="background-color: #000870;" width="180">{$Tr->_('description')}</th>
            <th style="background-color: #000870;" width="180">{$Tr->_('date')}</th>
            <th style="background-color: #000870;" width="180">{$Tr->_('hour')}</th>
            <th style="background-color: #000870;" width="180">{$Tr->_('category')}</th>
            <th style="background-color: #000870;" width="180">{$Tr->_('lugar')}</th>
            <th style="background-color: #000870;" width="248">{$Tr->_('created')}</th>
            <th style="background-color: #000870;" width="248">{$Tr->_('updated')}</th>
            <th style="background-color: #000870;" width="248" class="botones_opciones"></th>
        {/if}
  </tr>
  {foreach $rows as $row}
  <!--Creo link para actualizar categoria por id con row.id en nombre de categoria-->
  <tr>
    <td>{$row.id}</td>
    <td><a href="/uploads/{$row.imagen}" target="_blank"><img src="/uploads/mini/{$row.imagen}" title="{$row.nombre}" alt="{$row.descripcion}" /></a></td>
    <td><a href="/evento/actualizar/id/{$row.id}/">{$row.nombre}</a></td>
    <td>{$row.descripcion}</td>
    <td>{$row.fecha|date_format:"%d/%m/%Y"}</td>
    <td>{$row.hora|date_format:"%I:%M"}</td>
    <td><a href="/categoria/actualizar/id/{$row.categoria_id}/">{$categorias[$row.categoria_id]}</a></td>
    <td><a href="/lugar/actualizar/id/{$row.lugar_id}/">{$lugares[$row.lugar_id]}</a></td>  
    <td>{$row.created|date_format:"%d/%m/%Y %I:%M:%S"}</td>
    <td>{$row.updated|date_format:"%d/%m/%Y %I:%M:%S"}</td>
    {if $user_data->role eq "ADM"}
	<td class="botones_opciones"><a href="/evento/actualizar/id/{$row.id}/" title="{$Tr->_('update')} {$row.nombre}" class="glyphicon glyphicon-edit"></a> <a href="javascript:confirmar('/evento/eliminar/id/{$row.id}/', '{$Tr->_("confirm_delete")} {$row.nombre}');" class="glyphicon glyphicon-trash" title="{$Tr->_("delete")} {$row.nombre}"></a></td>
  	{/if}
  </tr>
  {/foreach}
</table>
{include file = 'backend/layout/pagination.tpl'}